Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check stdout is a tty before using terminal features #772

Merged
merged 1 commit into from
Oct 24, 2016

Conversation

kamalmarhubi
Copy link
Contributor

The implementation only checked if stderr was a tty. This lead to escape
codes in output when piped from stdout. For example, this had ANSI
codes show up in less:

$ rustup component list | less

while this did not:

$ rustup component list 2>&1 | less

even though no output went to stderr.

The implementation only checked if stderr was a tty. This lead to escape
codes in output when piped from stdout. For example, this had ANSI
codes show up in `less`:

    $ rustup component list | less

while this did not:

    $ rustup component list 2>&1 | less

even though no output went to stderr.
@brson brson merged commit 488b230 into rust-lang:master Oct 24, 2016
@brson
Copy link
Contributor

brson commented Oct 24, 2016

Thanks @kamalmarhubi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants